Edge detection is a technique in image processing that identifies points in a digital image at which image brightness changes sharply or has discontinuities. Detecting sharp changes in image brightness is often desirable to capture important events and properties in the depicted image. Discontinuities in image brightness often correspond with object edges, discontinuities in depth, discontinuities in surface orientation, changes in material properties, variations in scene illumination, etc.
In an ideal scenario, applying an edge detector to an image identifies a set of connected curves that indicate boundaries of objects, boundaries of surface markings, and curves that correspond to discontinuities in surface orientation. Applying an edge detector to an image may significantly reduce the amount of data to be processed downstream by filtering information that may be regarded as less relevant, while preserving the important structural properties of an image. While quality edge detection may substantially simplify and enhance downstream image processing, edge detection in non-trivial images is often hampered by fragmentation, false edges, and other limitations that may mitigate the described benefits.
FIG. 1 is a digital photograph of a bicycle chained to a bicycle rack. The photograph depicts all features of a normal photograph including textures and shading. FIG. 2 is a depiction of the digital photograph of FIG. 1 following conventional edge detection processing. The image has been simplified, removing many less important details, to only depict the structural framework of the photograph. During processing, each pixel of the photograph is compared to surrounding pixels and is given a score identifying the likelihood that the pixel is an edge pixel. FIG. 2 is a visualization of these edge-likelihood scores, where brighter pixels correspond to pixels of the photograph that are deemed likely to correspond to edges in the photograph.
FIG. 3 depicts a block diagram for a system for generating an edge map for a digital image. A digital image 52 is received by an edge detector 54. The edge detector 54 processes the image using any of a number of known edge detecting techniques to generate an edge map 56. The edge map 56 may be generated in a variety of forms including storage of edge-likelihood scores for each pixel of the digital image 52 or an on-off representation where each pixel is associated with a ‘1’ or ‘0’ value identifying whether the pixel has been deemed an edge pixel by the edge detector. Example edge detection techniques include the Canny, Canny-Deriche, differential, and Sobel techniques.
FIG. 4 depicts a block diagram of a conventional edge detector for generating an edge map in conjunction with a gradient threshold comparator. A digital image 62 is received by an edge detector 64 for generation of an edge map 66. The received digital image 62 is propagated to each of four filters: a horizontal filter 68, a vertical filter 70, a principal diagonal filter 72, and an off diagonal filter 74. Each of the filters measures the gradient, or rate of change, of pixel brightness in comparison to surrounding pixels in the filter's specified direction for each pixel and outputs a directional gradient value. These values are received from the filters and are added together at 76 to generate a gradient score for a pixel. In the configuration of FIG. 4, the pixel gradient score is received by a comparator 78 and measured against a gradient threshold 80. If the gradient score is greater than the gradient threshold 80, then the pixel is identified as being an edge pixel in the edge map 66.
FIG. 5 depicts a plot of pixels against gradient level value scores. The depicted data 102 shows the number of pixels in the input digital image that are assigned each gradient level value score. A gradient threshold value is depicted at 104. All pixels that appear to the right of the gradient threshold value line 104 are deemed edge pixels, while all pixels to the left of the line 104 are deemed non-edge pixels.